package LB2;

/**
 * Created with IntelliJ IDEA.
 * User: Борис
 * Date: 15.10.13
 * Time: 19:06
 * To change this template use File | Settings | File Templates.
 */
public class OutputSpreadsheet {
    void printSpreadsheet(String titColOne,String titColTwo,String titColThree,double[][] colTwo,double[] colThree){
        int sizeString = colTwo[0].length;
        double[][] spreadsheet = new double[3][sizeString];
        for(int i = 0; i<sizeString; i++){
            spreadsheet[0][i] = colTwo[0][i];
            spreadsheet[1][i] = colTwo[1][i];
            spreadsheet[2][i] = colThree[i];
        }
        for(int j = 0; j<sizeString; j++){
            if(j==0) System.out.println(titColOne+"\t   "+titColTwo+"\t                   "+titColThree+"\t   ");
            for(int i = 0; i<3; i++){
                System.out.print(spreadsheet[i][j]+"\t   ");
            }
            System.out.println();
        }
    }
    void printArray(String titColOne,String titColTwo,double[][] array){
        int sizeString = array[0].length;
        for(int j = 0; j<sizeString; j++){
            if(j==0) System.out.println(titColOne+"\t  "+titColTwo+"\t  ");
            for(int i = 0; i<2; i++){
                System.out.print(array[i][j]+"\t  ");
            }
            System.out.println();
        }
    }
}
